<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
    <link rel="shortcut icon" type="image/x-icon" href="assets/img/favicon.ico">
    <title>Preclinic - Medical & Hospital - Bootstrap 4 Admin Template</title>
    <link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/dataTables.bootstrap4.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/style.css">
    <!--[if lt IE 9]>
		<script src="assets/js/html5shiv.min.js"></script>
		<script src="assets/js/respond.min.js"></script>
	<![endif]-->
</head>

<body>
            <div class="content">
                <div class="row">
                    <div class="col-sm-12">
                        <h4 class="page-title">Payments</h4>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="table-responsive">
                            <table class="table table-striped custom-table datatable mb-0">
                                <thead>
                                    <tr>
                                        <th>交易流水号</th>
                                        <th>患者</th>
                                        <th>支付方式</th>
                                        <th>支付时间</th>
                                        <th>支付金额</th>
                                    </tr>
                                </thead>
                                <tbody id="payments">                                    
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            
    <div class="sidebar-overlay" data-reff=""></div>
    <script src="assets/js/jquery-3.2.1.min.js"></script>
	<script src="assets/js/popper.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/jquery.dataTables.min.js"></script>
    <script src="assets/js/dataTables.bootstrap4.min.js"></script>
    <script src="assets/js/jquery.slimscroll.js"></script>
    <script src="assets/js/app.js"></script>
	<!--json data-->
	<script type="text/javascript" src="json/payments.json"></script>
	<script type="text/javascript">
	$(document).ready(function () {	
		var paymentsStr = "";
		for(var i = 0; i < payments.length; i++){
			paymentsStr = paymentsStr + '<tr>';
            paymentsStr = paymentsStr + '<td><a href="invoice-view.html">'+ payments[i].invoiceNum +'</a></td>';
            paymentsStr = paymentsStr + '<td>';
            paymentsStr = paymentsStr + '<h2><a href="#">'+ payments[i].patientName +'</a></h2>';
            paymentsStr = paymentsStr + '</td>';
            paymentsStr = paymentsStr + '<td>'+ payments[i].type +'</td>';
            paymentsStr = paymentsStr + '<td>'+ payments[i].time +'</td>';
            paymentsStr = paymentsStr + '<td>￥'+ payments[i].amount +'</td>';
            paymentsStr = paymentsStr + '</tr>';
		}
		$("#payments").html(paymentsStr);
	});
	</script>
</body>

</html>